package com.mapforge.gui.interfaces;

import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseListener;

import javax.swing.event.UndoableEditListener;

import com.mapforge.listener.MapToolChangeListener;
import com.mapforge.listener.RenderListener;
import com.mapforge.listener.TileLayerCreationListener;
import com.mapforge.listener.TileLayerDeletionListener;
import com.mapforge.listener.TileLayerEditListener;
import com.mapforge.listener.TileMapCreationListener;
import com.mapforge.listener.TileSelectionListener;
import com.mapforge.map.Tile;
import com.mapforge.map.TileMap;

public interface TileMapEditorGUIInterface extends TileMapCreationListener,
		TileSelectionListener, TileLayerCreationListener,
		TileLayerDeletionListener, TileLayerEditListener, UndoableEditListener,
		MapToolChangeListener, RenderListener {

	public void setTiledMap(TileMap tileMap);

	public TileMap getTiledMap();

	public void repaint();

	public void scrollRectToVisible(Rectangle rectangle);

	public Point getMouseTileAtPosition();

	public Point getLastMouseClickTileAtPosition();

	/**
	 * Returns a {@link Rectangle} which encompasses all visible {@link Tile
	 * tiles} of the {@link TileMap} this {@link TileMapEditorGUIInterface} is
	 * displaying.
	 * 
	 * @return {@link Rectangle} encompassing {@link Tile tiles} this is
	 *         displaying.
	 */
	public Rectangle getVisibleTileRectangle();

	public Point convertPointToTileCoordinates(int x, int y);

	public void addMouseListener(MouseListener listener);

}
